<ion-view view-title="限时抢购" class="myworld_sale">

	<!--描述：滑动块-->
	<ion-content scroll="false">

		<div class="row text-center font-large-my padding-0">
			<div class="col top-activated" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				<img src="img/pro_manager2.png" /><br /> 活动设置
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				<img src="img/pro_manager.png" /><br /> 抢购商品
			</div>
			<div class="col" on-tap="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				<img src="img/pro_manager.png" /><br /> 抢购对象
			</div>
		</div>

		<ion-slide-box delegate-handle="main-handle" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

					<!--引入外部的页面-->
					<div ng-include="'templates/myworld/sale/activitysetting_tem.html'"></div>

					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div class="list">
						<li class="item item-thumbnail-left item-text-wrap" ng-repeat="goods in goods.data">
							<img src="{{goods.image}}" />
							<p>{{goods.name}}</p>
							<p>数量：{{goods.storenumber}} <span class="right-zhang">限购：{{goods.personlimit}}</span></p>
							<p>价格：<span class="assertive">{{goods.price|currency:'￥'}}</span></p>
						</li>
					</div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div class="list">
							<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
									<div class="input-label">区域</div>
									<div class="input-value" ng-click="doSelectRegion()">{{input.region_select.region_name}}</div>
								</div>
						<li class="item padding-5 item-borderless">
							<div class="button-bar">
								<div class="button button-small stable-border" style="border-right:1px solid #b2b2b2 ;" ng-class="{'button-assertive':isAlluser}" on-tap="chang_user()">全部终端用户</div>
								<div class="button button-small col-offset-3 stable-border" ng-class="{'button-assertive':isAllfriend}" on-tap="chang_friend()">全部好友</div>
							</div>
						</li>

						<li class="item item-checkbox" ng-show="isAlluser" on-tap="tap_member_all()">
							<label class="checkbox checkbox-square checkbox-assertive">
				 		 	 	<input type="checkbox" ng-model="input.member_all" />
				 		 	</label>全选
						</li>
						<div ng-repeat="member in store" ng-show="isAlluser">
							<ion-checkbox class="padding-0 item  item-thumbnail-left item-text-wrap" style="padding-right:40px;" ng-model="member.checked" on-tap="member_tap(member.member_id)">
								<img src="img/upload/pro-img01.jpg" />
								<p>{{member.member_name}}</p>
								<p class="margin-top-10-my">该授权中心销售能力强，希望能与贵授权中心长期合作</p>
							</ion-checkbox>
						</div>
						<li class="item item-checkbox" ng-show="isAllfriend" on-tap="tap_friend_all()">
							<label class="checkbox checkbox-square checkbox-assertive">
				 		 	 	<input type="checkbox" ng-model="input.friend_all"  />
				 		 	</label>全选
						</li>
						<ion-checkbox ng-show="isAllfriend" class="padding-0 item  item-thumbnail-left item-text-wrap" style="padding-right:40px;" ng-repeat="friend in friends" ng-model="friend.checked" on-tap="friend_tap(friend.member_id)">
							<img src="img/upload/pro-img01.jpg" />
							<p>{{friend.name}}</p>
							<p class="margin-top-10-my">该授权中心销售能力强，希望能与贵授权中心长期合作</p>
						</ion-checkbox>
					</div>

					<div class="padding button-bar">
						<button class="button  button-assertive">取消</button>
						<button class="button  button-positive col-offset-10" on-tap="get_region()">保存</button>
					</div>
					<div class="list list-borderless">
						<li class="item padding-10 text-center" style="color: black;">
							已选择授权中心
						</li>
						<div ng-repeat="region in show_region">
							<hr />
							<li class="item item-input">
								<span>区域：</span> {{region.region_name}}<i class="icon ion-minus-circled assertive font-1rem-my" on-tap="delete_region($index)"></i>

							</li>
							<li class="item item-input item-icon-right" ng-repeat="store in region.store">
								<span ng-class="{invisible:$index>0}"> 授权中心名称：</span>{{store.store_name}}<i class="icon ion-minus-circled assertive font-1rem-my" on-tap="delete_store(region.region_name,$index)"></i>

							</li>
							<!--<li class="item item-input">
					       	   	是否允许改价：{{store.change_price}}
					       	</li>-->
						</div>
					</div>

					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

		</ion-slide-box>
	</ion-content>
</ion-view>